/***baseHttp.js***/
var $=function(id){return document.getElementById(id);}
var XMLHttpRequestObject = false;
if (window.XMLHttpRequest) {XMLHttpRequestObject = new XMLHttpRequest();} 
else {if (window.ActiveXObject) {XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP");}}
function getData(dataSource,data) {
	if (XMLHttpRequestObject) {		
		XMLHttpRequestObject.open("POST", dataSource,true);
		XMLHttpRequestObject.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		XMLHttpRequestObject.onreadystatechange = function() {}    
		XMLHttpRequestObject.send(data);
	}
}
/**点击数统计*/
function ck(id,obj){
	if(obj.href.indexOf('#')!=-1||obj.href.indexOf('javascript:void(null)')!=-1){obj.target="_parent";obj.href="javascript:void(null)";}else{obj.target="_blank";}
	getData("http://#","id="+id);
}	
ICss={add:function(css){
	var D=document,e=D.createElement('style');
	e.setAttribute("type","text/css");
	e.styleSheet&&(e.styleSheet.cssText=css)|| e.appendChild(D.createTextNode(css)); 
	D.getElementsByTagName('head')[0].appendChild(e); 
}}


/***adver_321***/
try{
/***topFloating.js***/
/** 头部下拉广告**/
function getCookie(cookieName) {  
    var cookies = document.cookie;
    var thePart = cookieName + "=";
    var thePartLen = thePart.length;
    var i=0;
    while(i < cookies.length){
        var j = i + thePartLen;
        if(cookies.substring(i,j)==thePart) {
            var end = cookies.indexOf(";",j);
            if (end == -1){ end = cookies.length;}
            return unescape(cookies.substring(j,end));
        }else{
        	i = cookies.indexOf(" ",i)+1;
        	if (i==0) {break;}
        }
    }
    return null;
}
function setCookie(cookieName, cookieValue) {
	var cookieStr = cookieName + "=" + escape(cookieValue) + "; path=/";
	if(arguments.length==3){
		var date=new Date();
		date.setTime(date.getTime()+arguments[2]*24*3600*1000);/*设置cookie过期时间 以天为单位*/
		cookieStr += "; expires="+date.toGMTString();
	}
	if(arguments.length==4){
		cookieStr += "; domain="+arguments[3];
	}
	document.cookie = cookieStr;
}

function TBscrollClass(){
	this.Speed,this.speedS=0,this.opCo=false,this.bObj,this.BHsum,this.bObj_C,this.CObj,this.cookie;
	this.openBanner = function(CO,s,b,id,sH,id_c,cookie){
		this.CObj=CO,this.Speed=s,this.opCo=b,this.bObj=$(id),this.BHsum=sH,this.bObj_C=$(id_c),this.cookie=cookie;
		if(getCookie(this.cookie) != "close"){
			if(this.opCo){
				this.bObj.style.display = "block";
				this.startSBanner();
			}else{return}
		}else{showTopBaner_2()}
	}
	this.closeBanner = function(){
		this.bObj.style.display = "none";
		this.bObj_C.style.display = "none";
		setCookie(this.cookie,"close",1);
		showTopBaner_2();
	}
	this.startSBanner = function(){
		this.AlphaStar,this.sum=Math.abs(this.BHsum/100);
		this.speedS += Math.abs(this.sum*this.Speed);
		if(this.speedS>=this.BHsum){
			clearTimeout(this.AlphaStar);
			this.bObj.style.height = this.BHsum+"px";
			this.bObj_C.style.display = "block";
		}else{
			this.bObj.style.height = this.speedS+"px";
			this.AlphaStar = setTimeout(this.CObj+'.startSBanner()',1);
		}
	}
}
function addListener(el,eventType,fn){
	if(el.addEventListener){
		el.addEventListener(eventType,fn,false);
	}else if(el.attachEvent){
		el.attachEvent("on" + eventType,fn);
	}else{
		el["on"+eventType] = fn;
	}
}
var tOut;
var TopBanerTime,TBsclass = new TBscrollClass();
function closeTopBanerTime(){clearInterval(TopBanerTime);TopBanerObj.style.display="none";showTopBaner_2()}
function showTopBaner_2(){if($(divId+"_REP")!=null) $(divId+"_REP").style.display="";}
function timeTopBanerFun(){
		TBsclass.openBanner("TBsclass",2,true,divId,_height,"TopBaner2_C","TBCcookie");
		TopBanerTime=setInterval('closeTopBanerTime()',12000);  //打开后停留的时间
}
function loading(id, callfun){
	var isIE=navigator.appVersion.indexOf("MSIE") != -1;
	var state;
	if(isIE){ieloading();}else{ffloading();}
	function ieloading(){
		try{state=document.getElementById(id).readyState;}catch(e){state=null;}
		if(state=="complete"){setTimeout(callfun,1000);}else{window.setTimeout(ieloading,5);}
	}
	function ffloading(){document.getElementById(id).onload=function(){setTimeout(callfun,10);}}  // 打开的速度
}

document.getElementById('topDownFloat0').style.width=960+'px';
var floatIframe=document.createElement('iframe');
floatIframe.setAttribute('id','floatIframe');
floatIframe.style.width='1px';
floatIframe.style.height='1px';
floatIframe.frameborder='0';
document.getElementsByTagName("body")[0].appendChild(floatIframe);
var divId='topDownFloat0';
var _height=50;
var TopBanerObj = $(divId);
with(TopBanerObj.style){position='relative';width='960px';margin='0 auto';overflow='hidden';height='1px';fontSize='0px';}
TopBanerObj.innerHTML = "<a href='javascript:TBsclass.closeBanner();' title='关闭--今天不显示' id='TopBaner2_C' style='position:absolute;right:5px;top:5px;background:url(http://www.sandib2b.cn/ad/ads_img/close17x17.gif);font-size:0;width:17px;height:17px;line-height:17px;display:none;'></a><a href='http://www.sandib2b.cn/join/' target='_blank'><img src='http://www.sandib2b.cn/ad/top_ad.gif' width='960' height='50' border='0' /></a>";
loading('floatIframe',timeTopBanerFun);
floatIframe.src='http://www.sandib2b.cn/ad/index_top_ad.gif';

}catch(e){}

/***adver_322***/
try{
$('topDownFloat0_REP').innerHTML="<a href='http://www.sandib2b.cn/about/contact.php' target='_blank'><img src='http://www.sandib2b.cn/ad/index_top_ad.gif' width='960' height='500' border='0' /></a>"
}catch(e){}